package com.atguigu.gulimall.cart.service;

import com.atguigu.gulimall.cart.vo.Cart;
import com.atguigu.gulimall.cart.vo.CartItem;

import java.util.concurrent.ExecutionException;

public interface CartService {
    //添加购物车
    CartItem addToCart(Long skuId, Integer num) throws ExecutionException, InterruptedException;

    /**
     * 获取购物车中的某个购物项
     * @param skuId
     * @return
     */
    CartItem getCartItem(long skuId);
    //获取购物车信息
    Cart getCart() throws ExecutionException, InterruptedException;
    //清空购物车
    void clearCart(String cartKey);
    //挑选购物项
    void checkItem(Long skuId, Integer check);
    //修改购物项数量
    void countItem(Long skuId, Integer num);

    void deleteItem(Long skuId);
}
